import QtQuick
import QtQuick.Layouts
import Fk
import Fk.Components.LunarLTK
import Fk.Pages.LunarLTK

ColumnLayout {
  id: root
  anchors.fill: parent
  property var extra_data: ({ name: "", data: [] })
  signal finish()

  BigGlowText {
    Layout.fillWidth: true
    Layout.preferredHeight: childrenRect.height + 4

    text: Lua.tr(extra_data.name)
  }


  Grid {
    id: gridLayout
    spacing: 20
    rowSpacing: 40
    rows: 2 
    columns: 7 

    Repeater {
      id: cardRepeater
      model: 13

      delegate: Rectangle {
        id: cardItem
        width : 50
        height : 66
        clip : true
        radius : 2

        enabled : true

        Rectangle {
          id : cardBank
          anchors.fill: parent
          anchors.centerIn: parent
          visible: !extra_data.data.includes(index+1)
          color: Qt.rgba(240, 240, 220, 0.7)
          opacity: 0.7
          z: 2
        }


        Image {
          id: numberItem
          anchors.centerIn: parent
          source: SkinBank.cardDir + "number/black/" + (index+1)
          scale : 1.7
        }

      }
    }
  }

}

